<?php
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
	<form action="?">
		<div class="tt">企业搜索</div>
		<input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
		<input type="hidden" name="file" value="<?php echo $file;?>"/>
		<input type="hidden" name="action" value="<?php echo $action;?>"/>
		<table cellpadding="2" cellspacing="1" class="tb">
			<tr>
				<td>&nbsp;
					<?php echo $fields_select;?>&nbsp;
					<input type="text" size="25" name="kw" value="<?php echo $kw;?>" title="关键词"/>&nbsp;
					<input type="text" name="psize" value="<?php echo $pagesize;?>" size="2" class="t_c" title="条/页"/>
					<?php echo $audit_select;?>&nbsp;
					<input type="submit" value="搜 索" class="btn"/>&nbsp;
					<input type="button" value="重 置" class="btn" onclick="window.location='?moduleid=<?php echo $moduleid;?>&file=<?php echo $file;?>&action=<?php echo $action;?>';"/>
				</td>
			</tr>
			<tr>
				<td>&nbsp;
					<?php echo category_select('catid', '所属行业', $catid, 25);?>&nbsp;
					<?php echo ajax_area_select('areaid', '所在地区', $areaid);?>&nbsp;

					<?php echo $size_select;?>&nbsp;

					<input type="checkbox" name="thumb" value="1"<?php echo $thumb ? ' checked' : '';?>/>图片&nbsp;
					<input type="checkbox" name="level" value="1"<?php echo $level ? ' checked' : '';?>/>推荐词条&nbsp;
				</td>
			</tr>
			<tr>
				<td>&nbsp;
					<?php echo dcalendar('fromtime', $fromtime);?> 至 <?php echo dcalendar('totime', $totime);?>&nbsp;
					会员名：<input type="text" name="username" value="<?php echo $username;?>" size="10"/>&nbsp;
					会员ID：<input type="text" name="uid" value="<?php echo $uid;?>" size="10"/>&nbsp;
				</td>
			</tr>
		</table>
	</form>
	<form method="post">
		<div class="tt">企业管理</div>
		<table cellpadding="2" cellspacing="1" class="tb">
			<tr>
				<th width="25"><input type="checkbox" onclick="checkall(this.form);"/></th>
				<th>ID</th>
				<th>版本id</th>
				<th>企业名称</th>
				<th>公司LOGO</th>
				<th>公司规模</th>
				<th>注册资本</th>
				<th>注册年份</th>
				<th>是否推荐</th>
				<th>是否启用</th>
				<th>新版本</th>

				<th width="100">操作</th>
			</tr>
			<?php foreach ($lists as $k => $v) { ?>
				<tr onmouseover="this.className='on';" onmouseout="this.className='';" align="center" >
					<td>
						<input type="checkbox" name="did[]" value="<?php echo $v['did'];?>"/>
						<input type="hidden"  name="eid" value="<?php echo $v['eid'];?>"/>
					</td>

					<td><?php echo $v['did'];?></td>
					<td><?php echo $v['eid'];?></td>
					<td><?php echo $v['title'];?></td>
					<td><img src="<?php echo $v['company_thumb'];?>" width="40" height="40" title="标题图,点击预览" alt=""/></td>
					<td><?php echo $v['company_size'] ? $sizes[$v['company_size']]  : '-';?></td>
					<td><?php echo $v['company_money'] ? $v['company_money'] . $v['company_unit']  : '-';?></td>
					<td><?php echo $v['company_money'] ? $v['company_year'].'年' : '-';?></td>
					<td><?php echo $v['level'] ? '●' : '-' ;?></td>
					<td><?php echo $v['authority'] ? '●' : '-' ;?></td>
					<td><?php echo CompanyAdmin::getEditionAudit($v['did']) ? '●' : '-' ;?></td>
<!--					<td><a href="?moduleid=4&file=list&action=edit&did=--><?php //echo $v['did'];?><!--"><img src="admin/image/edit.png" width="16" height="16" title="编辑词条" alt=""/></a>&nbsp;-->
					<td><a href="/company/edit.php?id=<?php echo $v['did'];?>&eid=<?php echo $v['eid']; ?>&type=admin"><img src="admin/image/edit.png" width="16" height="16" title="编辑词条" alt=""/></a>&nbsp;
						<a href="?moduleid=4&file=edition&did=<?php echo $v['did'];?>"><img src="admin/image/view.png" width="16" height="16" title="版本管理" alt=""/></a>&nbsp;
<!--						<a href="?moduleid=4&file=list&action=login&did=--><?php //echo $v['did'];?><!--" target="_blank"><img src="admin/image/set.png" width="16" height="16" title="进入会员个人资料中心" alt=""/></a>&nbsp;-->
						<a href="?moduleid=4&file=list&action=delete&eid=<?php echo $v['eid'];?>&did=<?php echo $v['did'];?>" onclick="return _delete();"><img src="admin/image/delete.png" width="16" height="16" title="删除" alt=""/></a></td>
				</tr>
			<?php }?>
		</table>
		<div class="btns">

			<input type="submit" value=" 显示词条 " class="btn" onclick="if(confirm('确定要显示选中词条吗？')){this.form.action='?moduleid=4&file=list&action=authority&authority=1'}else{return false;}"/>&nbsp;
			<input type="submit" value=" 隐藏词条 " class="btn" onclick="if(confirm('确定要隐藏选中词条吗？')){this.form.action='?moduleid=4&file=list&action=authority&authority=0'}else{return false;}"/>&nbsp;
			<input type="submit" value=" 设为推荐 " class="btn" onclick="if(confirm('确定要推荐选中词条吗？')){this.form.action='?moduleid=4&file=list&action=level&level=1'}else{return false;}"/>&nbsp;
			<input type="submit" value=" 取消推荐 " class="btn" onclick="if(confirm('确定要取消推荐吗？')){this.form.action='?moduleid=4&file=list&action=level&level=0'}else{return false;}"/>&nbsp;
			<input type="submit" value=" 删除词条 " class="btn" onclick="if(confirm('系统将删除选中词条的所有版本！此操作将不可撤销')){this.form.action='?moduleid=4&file=list&action=delete'}else{return false;}"/>&nbsp;
		</div>
	</form>
	<div class="pages"><?php echo  $do->getPn()->render();?></br>
	<span>共<?php echo $items;?>条/<?php echo $do->getPn()->getPages();?>页&nbsp;
		<?php if ($do->getPn()->getPages()>1){;?>
		到第</span>
		<input type="text" name="page-num-input" id="xd_page_jump"/>
		<span>页</span>
		<button type="submit" onclick="xdChangeAndLocation('page', $('#xd_page_jump').val())">确定</button>
		<?php };?></div>
	<br/>
	<script type="text/javascript">Menuon(0);</script>
<?php include tpl('footer'); ?>